3.5.76 \(\int \frac {\cot ^4(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx\) [476]

Optimal. Leaf size=60 \[ \frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}} \]

[Out]

cot(f*x+e)/f/(a*cos(f*x+e)^2)^(1/2)-1/3*cot(f*x+e)*csc(f*x+e)^2/f/(a*cos(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3255, 3286, 2686} \begin {gather*} \frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^4/Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

Cot[e + f*x]/(f*Sqrt[a*Cos[e + f*x]^2]) - (Cot[e + f*x]*Csc[e + f*x]^2)/(3*f*Sqrt[a*Cos[e + f*x]^2])

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3255

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3286

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \frac {\cot ^4(e+f x)}{\sqrt {a-a \sin ^2(e+f x)}} \, dx &=\int \frac {\cot ^4(e+f x)}{\sqrt {a \cos ^2(e+f x)}} \, dx\\ &=\frac {\cos (e+f x) \int \cot ^3(e+f x) \csc (e+f x) \, dx}{\sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cos (e+f x) \text {Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\csc (e+f x)\right )}{f \sqrt {a \cos ^2(e+f x)}}\\ &=\frac {\cot (e+f x)}{f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x)}{3 f \sqrt {a \cos ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 37, normalized size = 0.62 \begin {gather*} -\frac {\cot (e+f x) \left (-3+\csc ^2(e+f x)\right )}{3 f \sqrt {a \cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^4/Sqrt[a - a*Sin[e + f*x]^2],x]

[Out]

-1/3*(Cot[e + f*x]*(-3 + Csc[e + f*x]^2))/(f*Sqrt[a*Cos[e + f*x]^2])

________________________________________________________________________________________

Maple [A]
time = 3.82, size = 44, normalized size = 0.73

method result size
default \(\frac {\cos \left (f x +e \right ) \left (3 \left (\sin ^{2}\left (f x +e \right )\right )-1\right )}{3 \sin \left (f x +e \right )^{3} \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) \(44\)
risch \(\frac {2 i \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \left (3 \,{\mathrm e}^{4 i \left (f x +e \right )}-2 \,{\mathrm e}^{2 i \left (f x +e \right )}+3\right )}{3 \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3}}\) \(81\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^4/(a-a*sin(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/3*cos(f*x+e)*(3*sin(f*x+e)^2-1)/sin(f*x+e)^3/(a*cos(f*x+e)^2)^(1/2)/f

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 571 vs. \(2 (59) = 118\).
time = 0.63, size = 571, normalized size = 9.52 \begin {gather*} -\frac {2 \, {\left ({\left (3 \, \sin \left (5 \, f x + 5 \, e\right ) - 2 \, \sin \left (3 \, f x + 3 \, e\right ) + 3 \, \sin \left (f x + e\right )\right )} \cos \left (6 \, f x + 6 \, e\right ) + 9 \, {\left (\sin \left (4 \, f x + 4 \, e\right ) - \sin \left (2 \, f x + 2 \, e\right )\right )} \cos \left (5 \, f x + 5 \, e\right ) + 3 \, {\left (2 \, \sin \left (3 \, f x + 3 \, e\right ) - 3 \, \sin \left (f x + e\right )\right )} \cos \left (4 \, f x + 4 \, e\right ) - {\left (3 \, \cos \left (5 \, f x + 5 \, e\right ) - 2 \, \cos \left (3 \, f x + 3 \, e\right ) + 3 \, \cos \left (f x + e\right )\right )} \sin \left (6 \, f x + 6 \, e\right ) - 3 \, {\left (3 \, \cos \left (4 \, f x + 4 \, e\right ) - 3 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \sin \left (5 \, f x + 5 \, e\right ) - 3 \, {\left (2 \, \cos \left (3 \, f x + 3 \, e\right ) - 3 \, \cos \left (f x + e\right )\right )} \sin \left (4 \, f x + 4 \, e\right ) - 2 \, {\left (3 \, \cos \left (2 \, f x + 2 \, e\right ) - 1\right )} \sin \left (3 \, f x + 3 \, e\right ) + 6 \, \cos \left (3 \, f x + 3 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) - 9 \, \cos \left (f x + e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 9 \, \cos \left (2 \, f x + 2 \, e\right ) \sin \left (f x + e\right ) - 3 \, \sin \left (f x + e\right )\right )} \sqrt {a}}{3 \, {\left (a \cos \left (6 \, f x + 6 \, e\right )^{2} + 9 \, a \cos \left (4 \, f x + 4 \, e\right )^{2} + 9 \, a \cos \left (2 \, f x + 2 \, e\right )^{2} + a \sin \left (6 \, f x + 6 \, e\right )^{2} + 9 \, a \sin \left (4 \, f x + 4 \, e\right )^{2} - 18 \, a \sin \left (4 \, f x + 4 \, e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 9 \, a \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, {\left (3 \, a \cos \left (4 \, f x + 4 \, e\right ) - 3 \, a \cos \left (2 \, f x + 2 \, e\right ) + a\right )} \cos \left (6 \, f x + 6 \, e\right ) - 6 \, {\left (3 \, a \cos \left (2 \, f x + 2 \, e\right ) - a\right )} \cos \left (4 \, f x + 4 \, e\right ) - 6 \, a \cos \left (2 \, f x + 2 \, e\right ) - 6 \, {\left (a \sin \left (4 \, f x + 4 \, e\right ) - a \sin \left (2 \, f x + 2 \, e\right )\right )} \sin \left (6 \, f x + 6 \, e\right ) + a\right )} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

-2/3*((3*sin(5*f*x + 5*e) - 2*sin(3*f*x + 3*e) + 3*sin(f*x + e))*cos(6*f*x + 6*e) + 9*(sin(4*f*x + 4*e) - sin(
2*f*x + 2*e))*cos(5*f*x + 5*e) + 3*(2*sin(3*f*x + 3*e) - 3*sin(f*x + e))*cos(4*f*x + 4*e) - (3*cos(5*f*x + 5*e
) - 2*cos(3*f*x + 3*e) + 3*cos(f*x + e))*sin(6*f*x + 6*e) - 3*(3*cos(4*f*x + 4*e) - 3*cos(2*f*x + 2*e) + 1)*si
n(5*f*x + 5*e) - 3*(2*cos(3*f*x + 3*e) - 3*cos(f*x + e))*sin(4*f*x + 4*e) - 2*(3*cos(2*f*x + 2*e) - 1)*sin(3*f
*x + 3*e) + 6*cos(3*f*x + 3*e)*sin(2*f*x + 2*e) - 9*cos(f*x + e)*sin(2*f*x + 2*e) + 9*cos(2*f*x + 2*e)*sin(f*x
 + e) - 3*sin(f*x + e))*sqrt(a)/((a*cos(6*f*x + 6*e)^2 + 9*a*cos(4*f*x + 4*e)^2 + 9*a*cos(2*f*x + 2*e)^2 + a*s
in(6*f*x + 6*e)^2 + 9*a*sin(4*f*x + 4*e)^2 - 18*a*sin(4*f*x + 4*e)*sin(2*f*x + 2*e) + 9*a*sin(2*f*x + 2*e)^2 -
 2*(3*a*cos(4*f*x + 4*e) - 3*a*cos(2*f*x + 2*e) + a)*cos(6*f*x + 6*e) - 6*(3*a*cos(2*f*x + 2*e) - a)*cos(4*f*x
 + 4*e) - 6*a*cos(2*f*x + 2*e) - 6*(a*sin(4*f*x + 4*e) - a*sin(2*f*x + 2*e))*sin(6*f*x + 6*e) + a)*f)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 58, normalized size = 0.97 \begin {gather*} \frac {\sqrt {a \cos \left (f x + e\right )^{2}} {\left (3 \, \cos \left (f x + e\right )^{2} - 2\right )}}{3 \, {\left (a f \cos \left (f x + e\right )^{3} - a f \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

1/3*sqrt(a*cos(f*x + e)^2)*(3*cos(f*x + e)^2 - 2)/((a*f*cos(f*x + e)^3 - a*f*cos(f*x + e))*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{4}{\left (e + f x \right )}}{\sqrt {- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**4/(a-a*sin(f*x+e)**2)**(1/2),x)

[Out]

Integral(cot(e + f*x)**4/sqrt(-a*(sin(e + f*x) - 1)*(sin(e + f*x) + 1)), x)

________________________________________________________________________________________

Giac [A]
time = 0.67, size = 99, normalized size = 1.65 \begin {gather*} \frac {\frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 9 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} - \frac {9 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3}}}{24 \, \sqrt {a} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a-a*sin(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

1/24*((tan(1/2*f*x + 1/2*e)^3 - 9*tan(1/2*f*x + 1/2*e))/sgn(tan(1/2*f*x + 1/2*e)^4 - 1) - (9*tan(1/2*f*x + 1/2
*e)^2 - 1)/(sgn(tan(1/2*f*x + 1/2*e)^4 - 1)*tan(1/2*f*x + 1/2*e)^3))/(sqrt(a)*f)

________________________________________________________________________________________

Mupad [B]
time = 19.19, size = 118, normalized size = 1.97 \begin {gather*} \frac {4\,{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,\sqrt {a-a\,{\left (\frac {{\mathrm {e}}^{-e\,1{}\mathrm {i}-f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}^2}\,\left (-{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,2{}\mathrm {i}+{\mathrm {e}}^{e\,4{}\mathrm {i}+f\,x\,4{}\mathrm {i}}\,3{}\mathrm {i}+3{}\mathrm {i}\right )}{3\,a\,f\,{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}-1\right )}^3\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^4/(a - a*sin(e + f*x)^2)^(1/2),x)

[Out]

(4*exp(e*2i + f*x*2i)*(a - a*((exp(- e*1i - f*x*1i)*1i)/2 - (exp(e*1i + f*x*1i)*1i)/2)^2)^(1/2)*(exp(e*4i + f*
x*4i)*3i - exp(e*2i + f*x*2i)*2i + 3i))/(3*a*f*(exp(e*2i + f*x*2i) - 1)^3*(exp(e*2i + f*x*2i) + 1))

________________________________________________________________________________________